#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

/*
//静态顺序表
#define N 10
typedef struct SeqList
{
	int a[N];
	int size;
	int capacity;          //容量
}SeqList;
*/

//动态顺序表
typedef int SeqDataType;
typedef struct SeqList
{
	SeqDataType* a;
	size_t size;
	size_t capacity;
}SeqList;

//初始化和销毁
void SeqListInit(SeqList *ps);
void SeqListDestroy(SeqList *ps);

//头插尾插  头删尾删
void SeqListPushBack(SeqList *ps, SeqDataType x);
void SeqListPushFront(SeqList *ps, SeqDataType x);
void SeqListPopBack(SeqList *ps);
void SeqListPopFront(SeqList *ps);
void SeqListPrint(SeqList* ps); 
int SeqListFind(SeqList* ps, SeqDataType x);
void SeqListInsert(SeqList* ps, int pos, SeqDataType x);
void SeqListErase(SeqList* ps, int pos);